## What to do?
## - this is a shell script (program in shell language), make sur this file is an executable by calling: chmod +x run.sh
## - run this script by calling: ./run.sh

## set the source and build directories paths
src_dir="."
bld_dir="../bld"

## set the source and executable files names
src_file="main.c"
exe_file="main"

## set the compiler name
CC="gcc"

## set the compiler flags
CFLAGS="-Wall"

## clean the build directory
\rm -r ${bld_dir}/*

## build the executable file (compile the program), lecture: http://c.comsci.us/process/build.html
${CC} ${CFLAGS} ${src_dir}/${src_file} -o ${bld_dir}/${exe_file}

## run the executable file (execute the program)
${bld_dir}/${exe_file}
